package com.atguigu.day03;

import java.util.Scanner;

public class Test7 {

    public static void main(String[] args) {
        int days = 1;
        int week = 2;
        int day, month;
        System.out.print("请输入月份:");
        Scanner s = new Scanner(System.in);
        month = s.nextInt();
        System.out.print("请输入日期:");
        day = s.nextInt();
        switch (month) {
            case 12:
                days += 30;
            case 11:
                days += 31;
            case 10:
                days += 30;
            case 9:
                days += 31;
            case 8:
                days += 31;
            case 7:
                days += 30;
            case 6:
                days += 31;
            case 5:
                days += 30;
            case 4:
                days += 31;
            case 3:
                days += 28;
            case 2:
                days += 31;
            case 1:
                days += 0;
                break;
        }
        days += day;
        String ans = "日";
        switch ((days - 1) % 7) {
            case 0:
                ans = "一";
                break;
            case 1:
                ans = "二";
                break;
            case 2:
                ans = "三";
                break;
            case 3:
                ans = "四";
                break;
            case 4:
                ans = "五";
                break;
            case 5:
                ans = "六";
                break;
            case 6:
                ans = "日";
                break;
        }
        System.out.println(month + "月" + day + "日是星期" + ans);
    }

}
/*
能 不能 能

 */
